Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.17](backport #41765) x-pack/filebeat/input/http_endpoint: fix handling of http_endpoint request exceeding memory limits #41820

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 28, 2024

Proposed commit message

The input does not have a way to communicate back-pressure to clients, potentially leading to unconstrained growth in the publisher event queue and an OoM event. This change adds a mechanism to keep track of the total sum of in-flight message bytes from the client in order to allow the server to return a 503 HTTP status when the total is too large.

Note that this does not monitor the total memory in the queue as that would require a complete understanding of the allocations in the preparation of event values to be sent to the publisher, but rather uses the message length as a reasonable proxy.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • There is also the possibility of using the metrics to retain the in-flight bytes count. This may be worth doing if we actually want to use that gauge metric. If we do that, I'd also think that having a overage count to distinguish failure due to this from all others. What is here is the minimal change required to get the feature.

How to test this PR locally

Related issues

Use cases

Screenshots

Logs


This is an automatic backport of pull request #41765 done by [Mergify](https://mergify.com).

…quest exceeding memory limits (#41765)

The input does not have a way to communicate back-pressure to clients,
potentially leading to unconstrained growth in the publisher event queue
and an OoM event. This change adds a mechanism to keep track of the
total sum of in-flight message bytes from the client in order to allow
the server to return a 503 HTTP status when the total is too large.

Note that this does not monitor the total memory in the queue as that
would require a complete understanding of the allocations in the
preparation of event values to be sent to the publisher, but rather uses
the message length as a reasonable proxy.

(cherry picked from commit 2ad3922)
@mergify mergify bot added the backport label Nov 28, 2024
@mergify mergify bot requested a review from a team as a code owner November 28, 2024 04:42
@mergify mergify bot assigned efd6 Nov 28, 2024
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 28, 2024
@botelastic
Copy link

botelastic bot commented Nov 28, 2024

This pull request doesn't have a Team:<team> label.

CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
@efd6 efd6 enabled auto-merge (squash) November 28, 2024 04:46
@efd6 efd6 disabled auto-merge November 28, 2024 05:07
@efd6 efd6 merged commit 183ce45 into 8.17 Nov 28, 2024
19 of 22 checks passed
@efd6 efd6 deleted the mergify/bp/8.17/pr-41765 branch November 28, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant